﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using gt.dotnetcore.webapi.extension;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

namespace gt.dotnetcore.webapi.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class TestController : ApiControllerBase
    {
        private readonly ILogger<TestController> _logger;

        public TestController(ILogger<TestController> logger)
        {
            _logger = logger;
            //_logger = loggerFactory.CreateLogger<TestController>();
        }

        [Route("error")]
        [HttpGet]
        public IActionResult Error()
        {
            throw new Exception("test error");
        }
    }
}